'use strict';
const {
    Model, INTEGER
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
    // class driver extends Model {
    //   /**
    //    * Helper method for defining associations.
    //    * This method is not a part of Sequelize lifecycle.
    //    * The `models/index` file will call this method automatically.
    //    */
    //   static associate(models) {
    //     // define association here
    //   }
    // };
    const yard = sequelize.define('yard', {
        YardID: {
            allowNull: false,
            primaryKey: true,
            type: DataTypes.INTEGER,
            autoIncrement: true
        },
        YardMax:{
            type:DataTypes.DOUBLE
        },
        YardScale:{
            type:DataTypes.DOUBLE
        },
        PositionX: {
            type: DataTypes.INTEGER
        },
        PositionY: {
            type: DataTypes.INTEGER
        },
        Height: {
            type: DataTypes.INTEGER
        },
        Weight: {
            type: DataTypes.INTEGER
        },
        ContainerPlace: {
            type: DataTypes.STRING,
            unique:true
        }
    }, {
        timestamps: false
    });
    return yard;
}